<template>
    <div class="des_con">
        <h1>{{info.title}}</h1>
        <hr>
        <div class="content" v-html="info.content"></div>
    </div>
</template>

<script>
    import {Toast} from 'mint-ui'
    export default {
        data () {
            return {
                id:this.$route.params.id,
                info:{} 
            }
        },
        created() {
            this.getdesc();
        },
        methods: {
            getdesc(){
                this.$http.get('api/goods/getdesc/'+this.id).then(res=>{
                    if(res.body.status==0){
                        this.info = res.body.message[0]
                    }else{
                        Toast("请求失败")
                    }
                })
            }
        }
    }
</script>

<style lang="scss">
.des_con{
    padding: 10px;
    h1{
        font-size: 16px;
        color:#007aff;
        text-align: center;
    }
    .content{
        img{
            width: 100%;
        }
    }
}
</style>